Using Human Interaction in a Business Process Model |
|
Before you begin this task:
Create a User Interface (XForm).
Business processes typically comprise automated activities as well as activities that need human intervention. When you have the need to perform an activity that needs human intervention, you need to create and use the User Interface (XForm) to complete that activity. To achieve this, perform the steps below.
- Do any one of the following:
- Select a starting point and click (Business Process Model) to open a business process model. The business process model appears in the business process modeler.
- If you have the business process model already opened in the business process modeler, then perform step 2.
- Drag required <User Interface> from the Workspace Documents > <Solution> > <Project> content tree on to a required activity in the process model that needs human intervention. The User Interface is associated with the activity and a delivery model is created for the User Interface.
- Double-click the activity to which the User Interface is attached. Alternatively, right-click the activity and select Properties. The <Activity>- Task Properties pane appears.
- Set the properties of the User Interface activity (human activity).
- Click . The business process model with User Interface activity is created.
- Right-click in the business process modeler and select Business Process Execution > Validate and generate BPML. Alternatively, in Workspace Documents > <Solution> > <Project>, right-click the business process model and select Business Process Execution > Validate and generate BPML. If there are no warnings, a status message appears indicating that there are no warnings. If there are warnings, resolve the errors and re-validate the business process model.
- Right-click in the business process modeler and select Business Process Execution > Publish to Organization. Alternatively, in Workspace Documents > <Solution> > <Project>, right-click the business process model and select Business Process Execution > Publish to Organization.The business process model is published to organization.
- Right-click in the business process modeler and select Business Process Execution > Run. Alternatively, in Workspace Documents > <Solution> > <Project>, right-click the business process model and select Business Process Execution > Run. The business process model is instantiated.
You have successfully achieved human interaction by using required User Interface in a business process model.
Example of Designing a Business Process Model with User Interface
The following example describes the procedure to model a business process model to display information on a product, which can be modified and displays a non-transactional form to fill in the UnitPrice and ReorderLevel details.
Business Requirements
The business process model should satisfy the following requirements:
- Display an XForm to enter the Product ID.
- Display another XForm, which shows details about the product based on the information provided in Step 1. These details should be editable.
- Display a third XForm, which shows the Product ID and ProductName. The XForm should also display two other fields, UnitPrice and ReorderLevel, which are editable.
- Display a fourth XForm, notification activity to the Purchase Manager displaying the ProductID and UnitPrice of the product.
Prerequisites
- A Get Product ID User Interface is created with Product ID as an input field.
- A Get Product Details User Interface is created to get the product details.
- An Update Product Details User Interface is created from the GetProduct method to update the product details in the database.
- A Notify Application Service User Interface is created to display the ProductID and UnitPrice of the product.
- You can use the above User Interfaces directly in a business process model as the WSDLs are already available which describe the input and output messageof the User Interface.
Designing the business process model
- Drag required User Interface to create a business process as follows:
- For the Get Product ID User Interface, map the Product ID as shown in the following figure:
- For the Update Product Details User Interface, map ProductID, ProductName and, UnitPrice and ReorderLevel as shown in the following figure:
- For Notify Application Service User Interface, map ProductId to Header and UnitPrice to Task as shown in the following figure:
- Save and validate the process model.
- Publish the model to runtime.
- Run the process to execute it.